class Army < ActiveRecord::Base
  belongs_to :attack
  belongs_to :hero, :conditions => ['isPegasus = ?', false]
  has_many :losses
  has_many :troops
  has_many :units, :through => :losses, :dependent => :destroy
  has_many :units, :through => :troops, :dependent => :destroy
  has_one :loot, :dependent => :destroy

  def to_label
    hero.name
  end
end
